package lab02.test29;

public class Test_29 {
    public static  void main(String[] args) {

        int[] arr = new int[8];
        int i = 0;

        try {
            for (i = 0; i < 10; i++) {
                arr[i] = i;

                System.out.println(arr[i]);
            }

        } catch (ArrayIndexOutOfBoundsException e) {

            System.out.println("数组越界");

        } finally {

            System.out.println("i=" + i);
        }
    }
}
